package com.dyc.maitaole.service.impl;

import com.dyc.maitaole.dao.BrandGoodDAO;
import com.dyc.maitaole.entity.BrandGood;
import com.dyc.maitaole.entity.Good;
import com.dyc.maitaole.service.BrandGoodService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BrandGoodServiceImpl implements BrandGoodService {
    @Autowired
    private BrandGoodDAO brandGoodDAO;

    public List<BrandGood> findAllGoodByBrandId(Integer brandId) {
        List<BrandGood> brandGoods = brandGoodDAO.queryAllGoodByBrandId(brandId);
        return brandGoods;
    }

    public int countAllGoodByBrandId(Integer brandId) {
        int count = brandGoodDAO.countAllGoodByBrandId(brandId);
        return count;
    }
}
